package telcoGUI.actionListener;

import java.awt.event.ActionEvent;

import swa2012.telco.broker.beans.Client;
import telcoGUI.userInterface.ClientBean;
import telcoGUI.userInterface.TelcoClientGUI;

public class RefreshButtonListener extends TelcoActionListener
{
	public RefreshButtonListener(TelcoClientGUI telcoGUI)
	{
		super(telcoGUI);
	}
	
	public void actionPerformed(ActionEvent event)
	{
		this.telcoGUI.getDestinationComboBox().removeAllItems();
		for (Client c : this.telcoGUI.getTelcoClient().refreshDestinationList())
			this.telcoGUI.getDestinationComboBox().addItem(new ClientBean(c));
	}
}
